package com.xsz.service;

import com.xsz.entity.Meeting;
import com.xsz.entity.User;
import com.xsz.repository.MeetingRepository;
import com.xsz.util.KeyUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Service
public class MeetingService {
    @Resource
    MeetingRepository meetingRepository;

    //新建会议
    public Meeting add(Meeting meeting) {
        return meetingRepository.save(meeting);

    }

    //查询所有会议记录
    public List<Meeting> getAll() {
        return meetingRepository.findAll();
    }

    //根据id查询会议记录
    public Meeting selectById(String id) {
        return meetingRepository.findById(id).get();
    }

    //删除会议
    public void delete(String id) {
        meetingRepository.deleteById(id);
    }

    //根据会议id添加路径
    public void addDowById(String dow,String id){
        meetingRepository.updateDowById(dow,id);
    }
}
